import datetime

cookie = "install_id=2480937513012510; ttreq=1$4d5189e29a39f7703be43c24339381c2193abfba; qh[360]=1; passport_csrf_token_default=fc8c0dae2446436ac200bc57307de130; odin_tt=d15eb43289bde7f3710b3a9910b3d88b76495563361fc2660794e932c5d0ba7cb468681c8c11bebdfebdc71a2bab3b8579d0cb6b060c97ad4cac785845f630c8; n_mh=iKsHrH_SOlDVstjy3l0ScuzPNDvXauBXlgz9dDozzRI; d_ticket=12635c66ac22fe27f2022690caa2ed59d12f3; sid_guard=bdb7ce0c2b9423b9220d65fc38c1a5e1%7C1617195891%7C5184000%7CSun%2C+30-May-2021+13%3A04%3A51+GMT; uid_tt=b3cb240fad45f57356a0a29b6c8eb52d; sid_tt=bdb7ce0c2b9423b9220d65fc38c1a5e1; sessionid=bdb7ce0c2b9423b9220d65fc38c1a5e1"  # 你自己的cookie
token = "00bdb7ce0c2b9423b9220d65fc38c1a5e1035951e3d7e006e26c33c6055af863118983047942d7383f68c299730c27a53a8fc9f55fa844b3331c8dcb4482ce497527f53d9ac4aa0be894dc68360a7985090d6e5d8995fbed352f5844c09dc5409fd2c-1.0.1"  # 你自己的token
query = "dGMCA76ot3awALq2Nv3edxyADAo696xICowObsiipaluXQSusMKPwsE29A43WC5ziMHWsK6lwrNg8%2FS0yn3zE8hrPoe%2BqLd2sADptqys3b%2FQtfzhVdl2eKyC3OXKrAATLbVRChLhl2D616yONxRek1xV9Qo%3D"  # 你自己的query
user_agent = "com.ss.android.ugc.aweme/630 (Linux; U; Android 10; zh_CN; Redmi K20 Pro Premium Edition; Build/QKQ1.190825.002; Cronet/58.0.2991.0)"  # 你自己的user-agent

user_id = 56627650197
sec_user_id = "MS4wLjABAAAA4ykrnvWo-PcJLJtSG5EYdwcHULNr9He-9kisyro9N2Y"
log = "log-{}.txt"
log_dir = 'log/'
delta = datetime.timedelta(days=1)
day = (datetime.datetime.now() - delta).strftime('%Y-%m-%d')


def add_log(file, time, fans, add):
    with open(log_dir + file, 'a') as f:
        log_str = time + ' ' + str(fans) + ' ' + str(add) + '\n'
        f.write(log_str)
